<%--
  Created by IntelliJ IDEA.
  User: jt
  Date: 2021/6/29
  Time: 15:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<link href="${ctx }/js/plugs/jquery-ui-1.10.3.custom/css/mycss/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="${ctx }/js/plugs/bootstrap-3.3.0-dist/dist/css/bootstrap.css">
<link href="${ctx }/js/plugs/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet">
<link href="${ctx }/css/dw-user.css" rel="stylesheet" type="text/css" />
<link href="${ctx }/js/plugs/jquery-ui-1.10.3.custom/css/mycss/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx }/js/plugs/jquery-ui-1.10.3.custom/js/jquery-1.10.1.js"></script>
<script type="text/javascript" src="${ctx }/js/plugs/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="${ctx }/js/plugs/jquery-ui-1.10.3.custom/css/mycss/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
<!-- 新 Bootstrap 核心 CSS 文件 -->
<!-- <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css"> -->
<link rel="stylesheet" href="${ctx }/js/plugs/bootstrap-3.3.0-dist/dist/css/bootstrap.css">
<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<!-- <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap-theme.min.css"> -->
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<!-- <script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> -->
<script src="${ctx }/js/plugs/bootstrap-3.3.0-dist/dist/js/bootstrap.js"></script>
<!-- <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> -->
<head>
    <title>机构管理角色展示</title>
</head>

<body>
<style>
    table,table tr th, table tr td { border:1px solid black; }
</style>
<script>



    function create(){
        var surveyId=$(this).parents("tr").find("input[name='surveyId']").val();
        var titleValue=$(this).parents("tr").find(".titleTag").text();

        $("body").append("<div id=\"myDialogRoot\"><div class='dialogMessage' style='padding-top:40px;margin-left:20px;padding-bottom:0px;'>"+
            "<div>请输入账号名称：<input id='surTitlename' type='text' style='padding:5px;width:320px;color:rgb(14, 136, 158);' value=''></div><div>请输入账号邮件：<input id='surTitleemail' type='text' style='padding:5px;width:320px;color:rgb(14, 136, 158);' value=''></div></div></div>");

        var myDialog=$( "#myDialogRoot" ).dialog({
            width:500,
//		height:220,
            autoOpen: true,
            modal:true,
            position:["center","center"],
            title:"创建",
            resizable:false,
            draggable:false,
            closeOnEscape:false,
            show: {effect:"blind",direction:"up",duration: 500},
            hide: {effect:"blind",direction:"left",duration: 200},
            buttons: {
                "OK":{
                    text: "确认新建",
                    addClass:'dialogMessageButton dialogBtn1',
                    click: function() {
                        //执行发布
                        var surTitlename=$("#surTitlename").val();
                        var surTitleemail=$("#surTitleemail").val();
                        var id=${id}
                        surTitlename=optionValue=escape(encodeURIComponent(surTitlename));
                        surTitleemail=optionValue=escape(encodeURIComponent(surTitleemail));

                        <%--var params="surveyName="+surveyName;--%>
                        <%--window.location.href="${ctx}/?"+params;--%>
                        <%--写个ajax--%>
                        $.ajax({
                            type:"get",
                            url:"${ctx}/url.do",
                            data:{
                                orgid:id,
                                name:surTitlename,
                                studentId:surTitleemail
                            },
                            dataType:"json",
                            success:function (data) {
                                if(data[0]==1){
                                    window.location.href="${ctx}/Insrole/edit.do";
                                }else {
                                    alert("请勿重复创建");
                                    window.location.href="${ctx}/Insrole/edit.do";
                                }
                            },
                            catch:function (error) {
                                alert("请勿重复创建");
                                window.location.href="${ctx}/Insrole/edit.do";
                            }
                        })
                    }
                },
                "CENCEL":{
                    text: "取消",
                    addClass:"dialogBtn1 dialogBtn1Cencel",
                    click: function() {
                        $( this ).dialog( "close" );
                    }
                }
            },
            open:function(event,ui){
                $(".ui-dialog-titlebar-close").hide();
                $("#surTitleTemp").val(titleValue+"");
            },
            close:function(event,ui){
                $("#myDialogRoot").remove();
            }
        });
        return false;
    }
</script>
<%--引入头部--%>
<%--<%@include file="/common/taglibs.jsp" %>--%>
<%--<%@include file="/WEB-INF/page/layouts/other.jsp"%>--%>
<%--<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>--%>
<%--<div id="header" >--%>
<%--    <div id="headerCenter"  class="bodyCenter" style="position: relative;">--%>
<%--        <div class="header_Item header_logo">--%>
<%--            &lt;%&ndash;--%>
<%--            <a href="${ctx }/">--%>
<%--                <img alt="国际认证评估问卷系统" src="${ctx }/images/logo/LOGO.png" >--%>
<%--            </a>--%>
<%--            &ndash;%&gt;--%>
<%--            <%@ include file="/WEB-INF/page/layouts/logo-img.jsp"%>--%>
<%--        </div>--%>
<%--        <shiro:guest>--%>
<%--            <div class="header_Item header_menu">--%>
<%--                <ul>--%>

<%--                </ul>--%>
<%--            </div>--%>
<%--            <div class="header_Item header_user" style="float: right;">--%>
<%--                <a href="${ctx }/login.jsp" class="btn-a-1"><spring:message code="login"/></a>--%>
<%--            </div>--%>
<%--        </shiro:guest>--%>

<%--        <shiro:user>--%>
<%--            <div class="header_Item header_menu">--%>
<%--                <ul>--%>
<%--                        &lt;%&ndash; <li><a href="${ctx }/" >首页</a></li> &ndash;%&gt;--%>
<%--                    <li><a href="${ctx }/design/my-survey/list.do" id="mysurvey">问卷</a></li>--%>
<%--                    <shiro:hasRole name="admin" >--%>
<%--                        <li><a href="${ctx }/sy/user/survey-admin/list.do" id="surveymanager">问卷管理</a></li>--%>
<%--                        <li><a href="${ctx }/sy/user/user-admin/list.do" id="usermanager">用户管理</a></li>--%>
<%--                        <li><a href="${ctx }/sy/group/group-admin/list.do" id="groupmanager">分组管理</a></li>--%>
<%--                    </shiro:hasRole>--%>
<%--                    <shiro:hasRole name="super" >--%>
<%--                        <li><a href="${ctx }/sy/lottery/list.do" id="lotterymanager">问卷奖项</a></li>--%>
<%--                        <li><a href="${ctx }/Insrole/edit.do" id="">机构管理</a></li>--%>
<%--                        <li><a href="${ctx }/sy/system/sys-property/input.do" id="systemset">系统设置</a></li>--%>
<%--                    </shiro:hasRole>--%>

<%--                    <li><a href="http://www.accreditation.com/">帮助</a></li>--%>
<%--                </ul>--%>
<%--            </div>--%>
<%--            <div class="header_Item header_user" style="float: right;margin-top: 8px;position:absolute;zoom: 1;z-index: 365;display: inline;right: 0px;">--%>
<%--                <a href="#" class="clickHideUserMenu">--%>
<%--						<span class="head_use_name">--%>
<%--						<shiro:principal></shiro:principal>--%>
<%--							<i class="fa fa-caret-down" aria-hidden="true"></i>--%>
<%--						</span>--%>
<%--                        &lt;%&ndash;<span class="header_user_icon">&nbsp;&nbsp;&nbsp;</span>&ndash;%&gt;--%>
<%--                </a>--%>
<%--                <div class="a-w-sel a-w-sel-head" style="">--%>
<%--                    <div class="w-sel" style="margin-top: 16px;">--%>
<%--                        <div class="selc">--%>
<%--                            <div class="selcc tbtag">--%>
<%--                                <div class="seli"><a class="nx-1" href="${ctx }/ic/user//myaccount.do">修改密码</a></div>--%>
<%--                                <div class="seli"><a class="nx-7" href="http://www.accreditation.com/">帮助及反馈</a></div>--%>
<%--                                <div class="seli"><a class="nx-8" href="${ctx }/user/logout.do">退出</a></div>--%>
<%--                            </div>--%>
<%--                        </div>--%>
<%--                    </div>--%>
<%--                </div>--%>
<%--            </div>--%>
<%--        </shiro:user>--%>
<%--    </div>--%>
<%--    <div style="clear: both;"></div>--%>
<%--</div>--%>
<div id="header">
    <div id="headerCenter" class="bodyCenter" style="position: relative; width: 1359px;">
        <div class="header_Item header_logo">
            <a href="/"><img alt="国际认证评估问卷系统" src="/images/logo/LOGO.png" align="middle" height="46"><span class="titleTempSpan" style="color:#ffa71d;"></span></a>
        </div>
        <div class="header_Item header_menu">
            <ul>
                <li><a href="/design/my-survey/list.do" id="mysurvey">问卷</a></li>
                <li><a href="/sy/user/survey-admin/list.do" id="surveymanager">问卷管理</a></li>
                <li><a href="/sy/user/user-admin/list.do" id="usermanager">用户管理</a></li>
                <li><a href="/sy/group/group-admin/list.do" id="groupmanager">分组管理</a></li>
                <li><a href="/sy/lottery/list.do" id="lotterymanager">问卷奖项</a></li>
                <li><a href="/Insrole/edit.do" id="">机构管理</a></li>
                <li><a href="/sy/system/sys-property/input.do" id="systemset">系统设置</a></li>
                <li><a href="http://www.accreditation.com/">帮助</a></li>
            </ul>
        </div>
        <div class="header_Item header_user" style="float: right;margin-top: 8px;position:absolute;zoom: 1;z-index: 365;display: inline;right: 0px;">
            <a href="#" class="clickHideUserMenu">
						<span class="head_use_name">
						admin
							<i class="fa fa-caret-down" aria-hidden="true"></i>
						</span>

            </a>
            <div class="a-w-sel a-w-sel-head" style="">
                <div class="w-sel" style="margin-top: 16px;">
                    <div class="selc">
                        <div class="selcc tbtag">
                            <div class="seli"><a class="nx-1" href="/ic/user//myaccount.do">修改密码</a></div>
                            <div class="seli"><a class="nx-7" href="http://www.accreditation.com/">帮助及反馈</a></div>
                            <div class="seli"><a class="nx-8" href="/user/logout.do">退出</a></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <div style="clear: both;"></div>
</div>
<%--结束符--%>
<input onclick="create()" type="button" class="sbtn25 sbtn25_1" value="创建" style="margin-left:20%;margin-top: 50px">
<table id="table" style="width:60%;margin-left:20%;margin-top: 30px;text-align: center" border="0" cellspacing="0">
    <tr>
        <!-- 受理部门 -->
        <td style="width:18%;">
            <div  title='<s:property value="#case[3] == null ? #case[7] : #case[3]"/>'>
                <c:out value='账号邮箱'/>&nbsp;
            </div>
        </td>

        <!-- 项目名称 -->
        <td style="width:28%;">
            <div  title=''>
                <a style="color: black"  target="_blank">
                    <c:out value="账号名称"/>
                </a>
            </div>
        </td>
        <td style="width:28%;">
            <div  title=''>
                <a style="color: black"  target="_blank">
                    <c:out value="操作"/>
                </a>
            </div>
        </td>
    </tr>
    <c:forEach items="${userlist }" var="zVo" varStatus="sta">
        <tr>
            <!-- 受理部门 -->
            <td style="width:18%;">
                <div  title='<s:property value="#case[3] == null ? #case[7] : #case[3]"/>'>
                    <c:out value='${zVo.email}'/>&nbsp;
                </div>
            </td>

            <!-- 项目名称 -->
            <td style="width:28%;">
                <div  title='${zVo.name }'>
                    <a style="color: black"  target="_blank">
                        <c:out value="${zVo.name }"/>
                    </a>
                </div>
            </td>

            <td style="width:28%;">
                <div  title=''>
                    <a style="" href="/Insrole/deleteuser.do?name=${zVo.name}&email=${zVo.email}" target="_blank">
                        删除
                        <c:out value=""/>
                    </a>
                </div>
            </td>
        </tr>
    </c:forEach>
</table>

</body>
</html>
